Allow clearcoat, anisotropy and refraction in SpatialMaterial in GLES2 #51967
+3
−6
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Follow-up to #50331.
These SpatialMaterial features work just fine in GLES2, but they were not exposed in the inspector when GLES2 was used.
After merging, remember to update Differences between GLES2 and GLES3 in the documentation.
HTML5 export for testing: https://0x0.st/-yhx.zip (link expires in December 2021)
Unzip the archive, host a local web server from the extracted folder using something like devd then open the web server's homepage in a browser. I can confirm the HTML5 export looks as expected for anisotropy and refraction here.
Preview
Clearcoat
The difference is very subtle, but it's there. This is likely due to #14403. No screenshot for this one, as the difference is barely visible even when looking directly at the specular lobe on the wood material.
Anisotropy
Refraction
Refractions will always be sharp regardless of material roughness. This is a GLES2 limitation, but the effect may still be enough for many use cases such as heat wave effects using particles.